package cn.eaay.stock.controller;

import cn.eaay.stock.service.CaptchaService;
import cn.eaay.stock.vo.resp.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@Api(tags = "验证码管理")
@RestController
@RequestMapping("/api")
public class CaptchaController {

    @Resource
    private CaptchaService captchaService;

    @GetMapping("/captcha")
    @ApiOperation(value = "生成验证码", notes = "创建验证码接口")
    public R<Map> generatorCaptcha() {
        R<Map> result = captchaService.generateCaptcha();
        return result;
    }
}
